maze procedure